<table>
<thead>
    <tr>
        <th><?php __('User ID') ?></th>
        <th><?php __('Nickname') ?></th>
        <th><?php __('Roles') ?></th>
        <th><?php __('Login times') ?></th>
        <th><?php __('Posts number') ?></th>
        <th><?php __('Actions') ?></th></tr>
</thead>
<tbody>
<?php
$index = 0;
foreach ($users as $user) { ?>

    <tr<?php echo $index++ % 2 == 0 ? '' : ' class="altrow"'; ?>>
        <td><?php echo $user['id'] ?></td>
        <td><?php echo $this->Html->link($user['user_name'], array('action'=>'view', $user['id'])); ?></td>
        <td><?php echo $this->element('userRoles', array('roles'=>$user['roles'])); ?></td>
        <td><?php echo $user['logintimes'] ?></td>
        <td><?php echo $user['postcount'] ?></td>
        <td><?php echo $this->Html->link(
            __('Edit', true),
            array('action'=>'edit', $user['id']),
            array('escape'=>false)
        ); ?> | <?php echo $this->Html->link(__('Delete', true), array('action'=>'del', $user['id'])) ?></td>
    </tr>
<?php } ?>

</tbody>
</table>
